3.151 \(\int \frac{\cos ^4(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx\)

Optimal. Leaf size=70 \[ \frac{\sin ^5(c+d x)}{5 a d}-\frac{2 \sin ^3(c+d x)}{3 a d}+\frac{\sin (c+d x)}{a d}+\frac{i \cos ^5(c+d x)}{5 a d} \]

[Out]

((I/5)*Cos[c + d*x]^5)/(a*d) + Sin[c + d*x]/(a*d) - (2*Sin[c + d*x]^3)/(3*a*d) + Sin[c + d*x]^5/(5*a*d)

________________________________________________________________________________________

Rubi [A]  time = 0.127816, antiderivative size = 70, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.161, Rules used = {3092, 3090, 2633, 2565, 30} \[ \frac{\sin ^5(c+d x)}{5 a d}-\frac{2 \sin ^3(c+d x)}{3 a d}+\frac{\sin (c+d x)}{a d}+\frac{i \cos ^5(c+d x)}{5 a d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^4/(a*Cos[c + d*x] + I*a*Sin[c + d*x]),x]

[Out]

((I/5)*Cos[c + d*x]^5)/(a*d) + Sin[c + d*x]/(a*d) - (2*Sin[c + d*x]^3)/(3*a*d) + Sin[c + d*x]^5/(5*a*d)

Rule 3092

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symb
ol] :> Dist[a^n*b^n, Int[Cos[c + d*x]^m/(b*Cos[c + d*x] + a*Sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, m},
x] && EqQ[a^2 + b^2, 0] && ILtQ[n, 0]

Rule 3090

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_.), x_Sym
bol] :> Int[ExpandTrig[cos[c + d*x]^m*(a*cos[c + d*x] + b*sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d}, x] &&
 IntegerQ[m] && IGtQ[n, 0]

Rule 2633

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 2565

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int \frac{\cos ^4(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx &=-\frac{i \int \cos ^4(c+d x) (i a \cos (c+d x)+a \sin (c+d x)) \, dx}{a^2}\\ &=-\frac{i \int \left (i a \cos ^5(c+d x)+a \cos ^4(c+d x) \sin (c+d x)\right ) \, dx}{a^2}\\ &=-\frac{i \int \cos ^4(c+d x) \sin (c+d x) \, dx}{a}+\frac{\int \cos ^5(c+d x) \, dx}{a}\\ &=\frac{i \operatorname{Subst}\left (\int x^4 \, dx,x,\cos (c+d x)\right )}{a d}-\frac{\operatorname{Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,-\sin (c+d x)\right )}{a d}\\ &=\frac{i \cos ^5(c+d x)}{5 a d}+\frac{\sin (c+d x)}{a d}-\frac{2 \sin ^3(c+d x)}{3 a d}+\frac{\sin ^5(c+d x)}{5 a d}\\ \end{align*}

Mathematica [A]  time = 0.0677495, size = 111, normalized size = 1.59 \[ \frac{5 \sin (c+d x)}{8 a d}+\frac{5 \sin (3 (c+d x))}{48 a d}+\frac{\sin (5 (c+d x))}{80 a d}+\frac{i \cos (c+d x)}{8 a d}+\frac{i \cos (3 (c+d x))}{16 a d}+\frac{i \cos (5 (c+d x))}{80 a d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^4/(a*Cos[c + d*x] + I*a*Sin[c + d*x]),x]

[Out]

((I/8)*Cos[c + d*x])/(a*d) + ((I/16)*Cos[3*(c + d*x)])/(a*d) + ((I/80)*Cos[5*(c + d*x)])/(a*d) + (5*Sin[c + d*
x])/(8*a*d) + (5*Sin[3*(c + d*x)])/(48*a*d) + Sin[5*(c + d*x)]/(80*a*d)

________________________________________________________________________________________

Maple [B]  time = 0.112, size = 141, normalized size = 2. \begin{align*} 2\,{\frac{1}{ad} \left ({\frac{-i/2}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{4}}}+{\frac{3/4\,i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{2}}}+1/5\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-5}-5/6\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-3}+{\frac{11}{16\,\tan \left ( 1/2\,dx+c/2 \right ) -16\,i}}-{\frac{i/8}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{2}}}-1/12\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{-3}+{\frac{5}{16\,\tan \left ( 1/2\,dx+c/2 \right ) +16\,i}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^4/(a*cos(d*x+c)+I*a*sin(d*x+c)),x)

[Out]

2/d/a*(-1/2*I/(tan(1/2*d*x+1/2*c)-I)^4+3/4*I/(tan(1/2*d*x+1/2*c)-I)^2+1/5/(tan(1/2*d*x+1/2*c)-I)^5-5/6/(tan(1/
2*d*x+1/2*c)-I)^3+11/16/(tan(1/2*d*x+1/2*c)-I)-1/8*I/(tan(1/2*d*x+1/2*c)+I)^2-1/12/(tan(1/2*d*x+1/2*c)+I)^3+5/
16/(tan(1/2*d*x+1/2*c)+I))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4/(a*cos(d*x+c)+I*a*sin(d*x+c)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 0.467378, size = 200, normalized size = 2.86 \begin{align*} \frac{{\left (-5 i \, e^{\left (8 i \, d x + 8 i \, c\right )} - 60 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 90 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 20 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i\right )} e^{\left (-5 i \, d x - 5 i \, c\right )}}{240 \, a d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4/(a*cos(d*x+c)+I*a*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/240*(-5*I*e^(8*I*d*x + 8*I*c) - 60*I*e^(6*I*d*x + 6*I*c) + 90*I*e^(4*I*d*x + 4*I*c) + 20*I*e^(2*I*d*x + 2*I*
c) + 3*I)*e^(-5*I*d*x - 5*I*c)/(a*d)

________________________________________________________________________________________

Sympy [A]  time = 0.761387, size = 197, normalized size = 2.81 \begin{align*} \begin{cases} \frac{\left (- 30720 i a^{4} d^{4} e^{12 i c} e^{3 i d x} - 368640 i a^{4} d^{4} e^{10 i c} e^{i d x} + 552960 i a^{4} d^{4} e^{8 i c} e^{- i d x} + 122880 i a^{4} d^{4} e^{6 i c} e^{- 3 i d x} + 18432 i a^{4} d^{4} e^{4 i c} e^{- 5 i d x}\right ) e^{- 9 i c}}{1474560 a^{5} d^{5}} & \text{for}\: 1474560 a^{5} d^{5} e^{9 i c} \neq 0 \\\frac{x \left (e^{8 i c} + 4 e^{6 i c} + 6 e^{4 i c} + 4 e^{2 i c} + 1\right ) e^{- 5 i c}}{16 a} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**4/(a*cos(d*x+c)+I*a*sin(d*x+c)),x)

[Out]

Piecewise(((-30720*I*a**4*d**4*exp(12*I*c)*exp(3*I*d*x) - 368640*I*a**4*d**4*exp(10*I*c)*exp(I*d*x) + 552960*I
*a**4*d**4*exp(8*I*c)*exp(-I*d*x) + 122880*I*a**4*d**4*exp(6*I*c)*exp(-3*I*d*x) + 18432*I*a**4*d**4*exp(4*I*c)
*exp(-5*I*d*x))*exp(-9*I*c)/(1474560*a**5*d**5), Ne(1474560*a**5*d**5*exp(9*I*c), 0)), (x*(exp(8*I*c) + 4*exp(
6*I*c) + 6*exp(4*I*c) + 4*exp(2*I*c) + 1)*exp(-5*I*c)/(16*a), True))

________________________________________________________________________________________

Giac [A]  time = 1.10948, size = 161, normalized size = 2.3 \begin{align*} \frac{\frac{5 \,{\left (15 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 24 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 13\right )}}{a{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i\right )}^{3}} + \frac{165 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 480 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 650 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 400 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 113}{a{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - i\right )}^{5}}}{120 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4/(a*cos(d*x+c)+I*a*sin(d*x+c)),x, algorithm="giac")

[Out]

1/120*(5*(15*tan(1/2*d*x + 1/2*c)^2 + 24*I*tan(1/2*d*x + 1/2*c) - 13)/(a*(tan(1/2*d*x + 1/2*c) + I)^3) + (165*
tan(1/2*d*x + 1/2*c)^4 - 480*I*tan(1/2*d*x + 1/2*c)^3 - 650*tan(1/2*d*x + 1/2*c)^2 + 400*I*tan(1/2*d*x + 1/2*c
) + 113)/(a*(tan(1/2*d*x + 1/2*c) - I)^5))/d